var buttons = require('sdk/ui/button/action');
var tabs = require("sdk/tabs");

require("sdk/tabs").on("ready", logURL);
 
function logURL(tab) {
  console.log(tab.url);
}
var button = buttons.ActionButton({
  id: "mozilla-link",
  label: "Visit Mozilla",
  icon: {
    "16": "./icon-16.png",
    "32": "./icon-32.png",
    "64": "./icon-64.png"
  },
  onClick: handleClick
});

function handleClick(state) {
	console.log("Hello World");
  tabs.open("https://www.facebook.com/");
}